<%@ page import="com.zsh.pojo.Person" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: ZSH
  Date: 2022/1/6
  Time: 18:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        Person person = new Person();
        person.setName("zsh");
        person.setPhones(new String[]{"123465","456464","4564654651"});
        List<String> cities = new ArrayList<String>();
        cities.add("北京");
        cities.add("上海");
        cities.add("深证");

        person.setCities(cities);
        Map<String, Object> map = new HashMap<>();

        map.put("1","1");
        map.put("2","2");
        map.put("3","3");
        person.setMap(map);

        pageContext.setAttribute("person",person);
    %>
    输出person
    <br>
    ${person}
    <br>
    name：${person.name}
    <br>
    phones:${person.phones[0]}
    <br>
    cities:${person.cities}
    <br>
    map :${person.map.get("1")}
</body>
</html>
